package com.example.zhongxiangmo;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import java.util.ArrayList;

public class YinDaoActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_yin_dao);
        initView();
    }

    private void initView() {
        ViewPager viewById = (ViewPager) findViewById(R.id.vp_yindao);

        View inflate = LayoutInflater.from(this).inflate(R.layout.yindao_1, null);
        View inflate1 = LayoutInflater.from(this).inflate(R.layout.yindao_v1, null);
        View inflate2 = LayoutInflater.from(this).inflate(R.layout.yindao_3, null);

        ArrayList<View> list = new ArrayList<>();

        list.add(inflate);
        list.add(inflate1);
        list.add(inflate2);

        YinDaoAdapter yinDaoAdapter = new YinDaoAdapter(list);

        viewById.setAdapter(yinDaoAdapter);
    }

}
